<template>
  <div id="app">
    <child-a></child-a>
    
    <h1>{{num}}</h1>
    <List v-for='item,i in list' :key='i' :index='i' :msg='item'></List>
   </div>
</template>

<script>
import List from './List.vue'
import ChildA from './ChildA.vue'
export default {
  name: 'App',
  data(){
    return{
      abc:123,
      list:['努力学习','认真听课','早日毕业'],
      num:0
    }
  },
  mounted(){
    this.bus.$on('abc', (n) => {
      this.num=n;
    })
  },
  components:{
    List,
    ChildA
  }
}
</script>

<style>

</style>
